<?php 
$first_name = "";
$last_name = "";
$subject = "";
$year = "";
$faculty = "";
$class = "";

foreach ($sc->result() as $re):
	$smi = $this->db->query("select * from member_info where id_member='$re->author'");
	foreach ($smi->result() as $rsmi):
			$first_name = $rsmi->first_name;
			$last_name = $rsmi->last_name;
	endforeach;
	$ss = $this->db->query("select * from subject where id_subject='$re->subject'");
	foreach ($ss->result() as $rss):
			$subject= $rss->name;
	endforeach;
	$sst = $this->db->query("select * from member_student where id_member='$re->author'");
	foreach ($sst->result() as $rst):
			$year = $rst->year;
			$faculty = $rst->faculty;
			$class = $rst->class;
	endforeach; 
	$now = date('Y');
	$x_year = $now;
	$xi_year = ($now-1);
	$xii_year = ($now-2);
					
	if($year==$x_year){
		$year = "X";
	} else if($year==$xi_year){
		$year = "XI";
	} else {
		$year = "XII";
	}
	
	$classes = $year." ".$faculty." ".$class;
?>
  <tr class="font-size-15">
    <td><?php echo $first_name." ".$last_name;?></td>
    <td class="capitalize"><?php echo $classes;?></td>
    <td><?php echo $subject;?></td>
    <td class="bold"><?php echo $re->score;?></td>
    <td><?php echo $re->posted;?></td>
    <td>
    <?php if($re->status=="deactive"){?>
    <a class="uiButtonRounded" href="javascript: active('<?php echo $re->id_score?>')">Active</a>
    <?php } else {?>
    <a class="uiButtonRounded" href="javascript: deactive('<?php echo $re->id_score?>')">Deactive</a>
    <?php }?>
    <a class="uiButtonRounded" href="javascript: corected('<?php echo $re->id_score?>')">corected</a>
    </td>
  </tr>
  <tr><td colspan="6"><hr size="1" color="#CCCCCC" width="100%" /></td></tr>
<?php endforeach; ?>